;-----------------------------------------------
;-----------------FXLIST.INI--------------------
; ----------------------------------------------
; This is Gandalf's Pre Attack Energy Gathering (version)
FXList FX_WKPreAttackBlast
  ParticleSystem
    Name = WKBlastInitialWave
    Offset = X:0.0 Y:0.0 Z:20.0
  End
  ParticleSystem
    Name = WKBlastInitialCenter
    Offset = X:0.0 Y:0.0 Z:20.0
  End
  ParticleSystem
    Name = WKBlastInitialVortex
    Offset = X:0.0 Y:0.0 Z:20.0
  End
  ParticleSystem
    Name = WKBlastRipple
    Offset = X:0.0 Y:0.0 Z:0.0
  End
  Sound
    Name = GandalfSpellVoice
  End
End

; ----------------------------------------------
; This is Gandalf's Shockwave Blast Attack (version)
FXList FX_WKBlast
  ParticleSystem
    Name = WKBlastFinalLight
    Offset = X:0.0 Y:0.0 Z:60   ;Z:8.0
  End
  ParticleSystem
    Name = WKBlastFinalShockWave
    Offset = X:0.0 Y:0.0 Z:20.0
  End
  ParticleSystem
    Name = WKBlastDust
    Offset = X:0.0 Y:0.0 Z:15.0
  End
;	ViewShake
;    Type = CINE_EXTREME
;  End
  Sound
    Name = GandalfBlastWeapon
  End
End

FXList FX_WKAnduril
  ParticleSystem
    Name = WK
Anduril
	AttachToObject	= Yes
	AttachToBone	= B_SWORDBONE
  End
End


;------------------------------------------------------------------------------
;------------------------------WEAPONS.INI-------------------------------------
;------------------------------------------------------------------------------

;------------------------------------------------------------------------------
Weapon WitchKingWordOfPower ; Big Blue Ring Blast
	IdleAfterFiringDelay = 0
	AttackRange = GANDALF_WORD_OF_POWER_RANGE
	MinimumAttackRange = 0.8
	WeaponSpeed = 401         ; dist/sec 
	MinWeaponSpeed = 241
	MaxWeaponSpeed = 601      ; dist/sec Upper limit on scaling, when attacking past nominal "max" range
	ScaleWeaponSpeed = Yes ; Used for lob weapons, scales speed proportional to range
	RadiusDamageAffects = ENEMIES NOT_SIMILAR
	DelayBetweenShots = 5000               ; time between shots, msec
	PreAttackDelay        = 2600
	PreAttackType         = PER_ATTACK ; Do the delay each time we attack a new target
	PreAttackFX           = FX_WKPreAttackBlast
	FireFX                = FX_WKBlast
	FiringDuration      = 1400
	DamageNugget                        ; A basic Nugget that just does damage
		Damage			= WITCHKING_WORD_OF_POWER_DAMAGE
		DamageScalar  		= 200000% NONE +IsengardLurtz +IsengardSaruman +MordorKhamul +RohanTheoden +RohanEomer +RohanEowyn +RohanGimli +RohanLegolas +GondorAragornMP +GondorGandalf +GondorBoromir +GondorFaramir 
		Radius			= 250.0
		DamageType		= MAGIC
		DamageFXType		= MAGIC 
		DeathType		= EXPLODED
		DamageSpeed		= 700.0 ; must match the ShockWaveSpeed below
		DamageScalar  		= 200000% NONE +IsengardLurtz +IsengardSaruman +MordorKhamul +RohanTheoden +RohanEomer +RohanEowyn +RohanGimli +RohanLegolas +GondorAragornMP +GondorGandalf +GondorBoromir +GondorFaramir +RohanPippin 
	End
;	MetaImpactNugget                    ; A Nugget that throws things back with force
;		HeroResist			= .75
;		ShockWaveAmount   = 70.0
;		ShockWaveRadius   = 500.0
;		ShockWaveTaperOff = 1.0
;		ShockWaveZMult    = 1.000
;		ShockWaveSpeed	  = 700.0 
;	End
End


;-------------------------------------------------------------------
;-------------------------WITCHKING.INI OR EVILFACTIONUNITS.INI-----
;-------------------------------------------------------------------

-----------------------------search for this:(should be first animation)--

		IdleAnimationState
			StateName				= STATE_Idle
			Animation				= IDLB
				AnimationName       = MUWchKng_IDLB
				AnimationMode       = LOOP
			End
--------------------and replace it with this:-----------------------------

		IdleAnimationState
			StateName           = STATE_Selected
			Animation           = ATNB
				AnimationName     = MUWchKng_ATNB
				AnimationMode     = LOOP
			End

;--------------------------------------------------------------------------
;-This keeps the WitchKing's Sword where it should be for "This Is My Hour".
;
;--------------------------------------------------------------------------


	;;; WORD OF POWER (BLUE RING BLAST) SPELL ;;;
	;;;WitchKing THIS IS MY HOUR;;;
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_WordEnabler
		SpecialPowerTemplate = SpecialAbilityWitchKingWordOfPower
		TriggeredBy = Upgrade_WitchKingWordOfPower
	End
	Behavior = SpecialPowerModule ModuleTag_WordStarter       
		SpecialPowerTemplate      = SpecialAbilityWitchKingWordOfPower
		UpdateModuleStartsAttack  = No
		TriggerFX			=FX_WKAnduril
		StartsPaused		  	  = Yes
	End
	Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_WordWeaponFireUpdate   
		SpecialPowerTemplate    = SpecialAbilityWitchKingWordOfPower
		WhichSpecialWeapon		= 1
		SkipContinue			= Yes
		
		UnpackTime              = 1705 
		PackTime                = 1		
		FreezeAfterTriggerDuration = 2500 ; Hold AI for this long after we fire.
		
		AwardXPForTriggering    = 0		
		StartAbilityRange		= 80.0
		
		SpecialWeapon			= WitchKingWordOfPower
		
	End


;----------------------------------------------------------
;------------------UPGRADE.INI-----------------------------
;----------------------------------------------------------

Upgrade Upgrade_WitchKingWordOfPower
  Type             		= OBJECT
End

Upgrade Upgrade_WKAnduril
	Type			= OBJECT
	PersistsInCampaign = Yes
End

;-----------------------------------------------------------
;------------------EXPERIENCELEVELS.INI---------------------
;-----------------------------------------------------------

Upgrades = Upgrade_WitchKingWordOfPower

;-----------------------------------------------------------
;------------------FXPARTICLESYSTEM.INI---------------------
;-----------------------------------------------------------

;;;-------begin witchking data-------

FXParticleSystem WKAnduril
  System
    Priority = AREA_EFFECT
    ParticleName = EXSplatHaze.tga
    Lifetime = 20 20
    SystemLifetime = 60
    SortLevel = 1
    Size = 0 15
    BurstCount = 2 3
    InitialDelay = 15 15
    IsParticleUpTowardsEmitter = Yes
  End
  Color = DefaultColor
    Color2 = R:255 G:75 B:0 5  ;;;R:0 G:106 B:185 5
    Color3 = R:0 G:0 B:0 20
  End
  Update = DefaultUpdate
    SizeRate = -0.25 -0.25
    SizeRateDamping = 1 1
    AngleZ = -7 7
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 1 1
  End
  EmissionVelocity = OrthoEmissionVelocity
  End
  EmissionVolume = LineEmissionVolume
    StartPoint = X:6 Y:3 Z:17
    EndPoint = X:6 Y:3 Z:28
  End
  Draw = DefaultDraw
  End
End

FXParticleSystem WKBlastDust
  System
    Priority = CRITICAL
    Shader = ALPHA
    ParticleName = EXSmokePuf07.tga
    PerParticleAttachedSystem = GandalfBlastDustCore
    Lifetime = 100 100
    SystemLifetime = 5
    Size = 1 2
    BurstCount = 25 50
    InitialDelay = 5 5
  End
  Color = DefaultColor
    Color1 = R:181 G:190 B:196 0
  End
  Alpha = DefaultAlpha
    Alpha1 = 0.2 0.3 0
    Alpha2 = -2 0 100
  End
  Update = DefaultUpdate
    SizeRate = 2 15
    SizeRateDamping = 0.8 0.8
    AngleZ = 0 7
    AngularRateZ = -0.1 -0.1
    AngularDamping = 0.92 0.94
    Rotation = ROTATE_V
  End
  Physics = DefaultPhysics
    VelocityDamping = 0.92 0.94
    DriftVelocity = X:0.032 Y:0.064 Z:0.15
  End
  EmissionVelocity = OutwardEmissionVelocity
    Speed = 20 20
  End
  EmissionVolume = CylinderEmissionVolume
    Radius = 12
  End
  Draw = DefaultDraw
  End
End

FXParticleSystem WKBlastDustCore
  System
    Priority = AREA_EFFECT
    Shader = ALPHA
    ParticleName = EXCloud01.tga
    Lifetime = 100 100
    SystemLifetime = 15
    Size = 5 10
    BurstDelay = 20 20
    BurstCount = 1 1
    InitialDelay = 15 15
  End
  Color = DefaultColor
    Color1 = R:255 G:243 B:230 0
    Color2 = R:236 G:238 B:240 30
  End
  Alpha = DefaultAlpha
    Alpha1 = 0.1 0.1 0
    Alpha2 = 0.2 0.2 5
    Alpha3 = 0 0 100
  End
  Update = DefaultUpdate
    SizeRate = 3 8
    SizeRateDamping = 0.9 0.85
    AngleZ = -0.25 0.25
    AngularRateZ = -0.1 0.1
    AngularDamping = 0.95 0.94
  End
  Physics = DefaultPhysics
    VelocityDamping = 0.9 0.92
    DriftVelocity = X:0 Y:0 Z:0.1
  End
  EmissionVelocity = OrthoEmissionVelocity
    X = -2 2
    Y = -1 2
    Z = 0 4
  End
  EmissionVolume = CylinderEmissionVolume
    Radius = 24
  End
  Draw = DefaultDraw
  End
End

FXParticleSystem WKBlastFinalLight
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXexplo01.tga
    Lifetime = 10 10
    SystemLifetime = 5
    Size = 10 10
    BurstCount = 2 2
  End
  Color = DefaultColor
    Color1 = R:176 G:169 B:168 0  ;;;R:89 G:168 B:255 0
    Color2 = R:0 G:0 B:0 10
  End
  Update = DefaultUpdate
    SizeRate = 80 160
    SizeRateDamping = 0.8 0.7
    AngleZ = -1 1
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    Gravity = 1
    VelocityDamping = 1 1
  End
  EmissionVelocity = OutwardEmissionVelocity
    Speed = 1 1
  End
  EmissionVolume = PointEmissionVolume
  End
  Draw = DefaultDraw
  End
End

FXParticleSystem WKBlastFinalShockWave
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXRing01.tga
    Lifetime = 40 40
    SystemLifetime = 5
    Size = 1 1
    BurstCount = 1 1
    IsGroundAligned = Yes
  End
  Color = DefaultColor
    Color1 = R:100 G:89 B:83 0 ;;;R:136 G:172 B:255 0
    Color2 = R:0 G:0 B:0 40
    ColorScale = -5 0
  End
  Update = DefaultUpdate
    SizeRate = 35 35
    SizeRateDamping = 1 1
    AngleZ = -1 1
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 0.8 0.8
  End
  EmissionVelocity = OutwardEmissionVelocity
  End
  EmissionVolume = PointEmissionVolume
    IsHollow = Yes
  End
  Draw = DefaultDraw
  End
End

FXParticleSystem WKBlastHitFlare
  System
    Priority = AREA_EFFECT
    ParticleName = EXexplo01.tga
    Lifetime = 10 10
    SystemLifetime = 20
    Size = 10 10
    StartSizeRate = -0.2 -0.2
    BurstDelay = 1 1
    BurstCount = 4 4
    InitialDelay = 5 5
  End
  Color = DefaultColor
    Color1 = R:100 G:89 B:83 0 ;;;R:89 G:168 B:255 0
    Color2 = R:0 G:0 B:0 10
  End
  Update = DefaultUpdate
    SizeRate = 5 10
    SizeRateDamping = 0.8 0.7
    AngleZ = -3 3
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    Gravity = 0.08
    VelocityDamping = 0.8 0.85
  End
  EmissionVelocity = OutwardEmissionVelocity
  End
  EmissionVolume = PointEmissionVolume
  End
  Draw = DefaultDraw
  End
End

FXParticleSystem WKBlastInitialCenter
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXLnzFlar1.tga
    Lifetime = 40 40
    SystemLifetime = 20
    Size = 5 5
    BurstDelay = 5 5
    BurstCount = 1 1
    InitialDelay = 20 20
  End
  Color = DefaultColor
    Color2 = R:100 G:89 B:83 20 ;;;R:136 G:172 B:255 20
    Color3 = R:0 G:0 B:0 40
  End
  Update = DefaultUpdate
    SizeRate = 2 2
    SizeRateDamping = 1.03 1.03
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 0.75 0.8
  End
  EmissionVelocity = OutwardEmissionVelocity
  End
  EmissionVolume = LineEmissionVolume
    StartPoint = X:0 Y:0 Z:8
    EndPoint = X:0 Y:0 Z:8
  End
  Draw = DefaultDraw
  End
End

FXParticleSystem WKBlastInitialVortex
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXLnzFlar2.tga
    Lifetime = 40 40
    SystemLifetime = 20
    Size = 5 5
    BurstDelay = 1 1
    BurstCount = 20 20
    IsParticleUpTowardsEmitter = Yes
  End
  Color = DefaultColor
    Color2 = R:100 G:89 B:83 5
  End
  Update = DefaultUpdate
    SizeRateDamping = 1 1
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 1.1 1.1
  End
  EmissionVelocity = OutwardEmissionVelocity
    Speed = -0.4 -0.4
  End
  EmissionVolume = CylinderEmissionVolume
    IsHollow = Yes
    Radius = 240
    Length = 16
  End
  Draw = DefaultDraw
  End
End

FXParticleSystem WKBlastInitialWave
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXRing01.tga
    Lifetime = 25 25
    SystemLifetime = 45
    Size = 400 400
    StartSizeRate = 1 1
    BurstDelay = 2 2
    BurstCount = 1 1
    IsGroundAligned = Yes
  End
  Color = DefaultColor
    Color2 = R:75 G:73 B:71 10 ;;;R:39 G:58 B:107 10
    Color3 = R:0 G:0 B:0 22
  End
  Update = DefaultUpdate
    SizeRate = -10 -10
    SizeRateDamping = 1.05 1.05
    AngleZ = -180 180
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 0.75 0.8
  End
  EmissionVelocity = OutwardEmissionVelocity
    Speed = -4 -4
    OtherSpeed = -4 -4
  End
  EmissionVolume = LineEmissionVolume
    IsHollow = Yes
    StartPoint = X:0 Y:0 Z:-8
    EndPoint = X:0 Y:0 Z:10
  End
  Draw = DefaultDraw
  End
End

FXParticleSystem WKBlastRipple
  System
    Priority = CRITICAL
    Shader = ALPHA
    ParticleName = SMUDGE.tga
    Lifetime = 25 25
    SystemLifetime = 25
    Size = 5 5
    BurstCount = 2 3
    InitialDelay = 15 15
  End
  Color = DefaultColor
    Color1 = R:100 G:89 B:83 0
  End
  Alpha = DefaultAlpha
    Alpha1 = 1 1 0
  End
  Update = DefaultUpdate
    SizeRate = 3 3
    SizeRateDamping = 1 1
    AngleZ = 0.01 0.02
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 0.96 0.97
    DriftVelocity = X:0 Y:0 Z:1
  End
  EmissionVelocity = CylindricalEmissionVelocity
    Radial = 1 2
    Normal = 1 1
  End
  EmissionVolume = CylinderEmissionVolume
    Radius = 32
    Length = 50
  End
  Draw = DefaultDraw
  End
End

FXParticleSystem WKBlastTier1
  System
    Priority = WEAPON_TRAIL
    ParticleName = EXFire04.tga
    Lifetime = 25 25
    Size = 50 50
    StartSizeRate = -0.16 -0.16
    BurstCount = 1 1
  End
  Color = DefaultColor
    Color1 = R:135 G:133 B:124 0
    Color2 = R:0 G:0 B:0 25
  End
  Update = DefaultUpdate
    SizeRate = 2 2
    SizeRateDamping = 0.9 0.9
    AngleZ = -2 2
    AngularRateZ = -0.01 0.01
  End
  Physics = DefaultPhysics
    VelocityDamping = 1 1
  End
  EmissionVelocity = OrthoEmissionVelocity
  End
  EmissionVolume = LineEmissionVolume
    StartPoint = X:0 Y:0 Z:8
    EndPoint = X:0 Y:0 Z:10
  End
  Draw = DefaultDraw
  End
End

;;;----end witchking data-----

;-----------------------------------------------------------
;------------------ATRIBUTEMODIFIER.INI---------------------
;-----------------------------------------------------------

;;;;;; SPELL BASED MODIFIERS ;;;;;;
ModifierList SpellBookAnduril
	Category	= SPELL
	Modifier	= DAMAGE_MULT 300%			; Weapon damage doubled
	Modifier	= ARMOR 50%			; Weapon damage doubled
	Modifier	= SPEED 125%
	Duration	= 0					; Duration is forever when set to 0
	;FX		= FX_Anduril	
End

;ModifierList SpellBookWKAnduril
;	Category	= SPELL
;	;Modifier	= DAMAGE_MULT 300%			; Weapon damage doubled
;	;Modifier	= ARMOR 50%			; Weapon damage doubled
;	;Modifier	= SPEED 125%
;	Duration	= 3000					; Duration is forever when set ;to 0
;	FX		= FX_Anduril	
;End

ModifierList SpellBookWKAnduril
	Category	= LEADERSHIP
	;Modifier	= DAMAGE_MULT 300%			; Weapon damage doubled
	;Modifier	= ARMOR 50%			; Weapon damage doubled
	;Modifier	= SPEED 125%
	Duration	= 3000					; Duration is forever when set to 0
	FX		= FX_WKAnduril	
End


;-----------------------------------------------------------
;------------------COMMANDSET.INI---------------------------
;-----------------------------------------------------------
(Under the MordorWitchKingCommandSet)

5 = Command_WitchKingWordOfPower

(Example of where to put it...)

CommandSet MordorWitchKingCommandSetNew
	1 = Command_WitchKingLeadership
	2 = Command_ToggleWitchKingWeapon
	3 = Command_FireWitchKingMorgulBlade
	4 = Command_SpecialAbilityBlackBreath
	5 = Command_WitchKingWordOfPower
	6 = Command_WitchKingMountFellBeast
		13 = Command_AttackMove
		14 = Command_Stop
		15 = Command_Guard
End

CommandSet MordorWitchKingRidingFellBeastCommandSetNew
	1 = Command_SpecialAbilityScreech
	2 = Command_WitchKingLeadership
	3 = Command_WitchKingUnMountFellBeast
		13 = Command_AttackMove
		14 = Command_Stop
		15 = Command_Guard
End

;-----------------------------------------------------------
;------------------COMMANDBUTTON.INI------------------------
;-----------------------------------------------------------

CommandButton Command_WitchKingWordOfPower
  Command                 = SPECIAL_POWER 
  SpecialPower            = SpecialAbilityWitchKingWordOfPower SpecialAbilityWitchKingHeroMode
;  Options                 = 
  TextLabel               = CONTROLBAR:WKWordOfPower
  ButtonImage             = HPWitchKingHour
  ButtonBorderType        = ACTION 
  DescriptLabel           = CONTROLBAR:ToolTipWKWordOfPower
  AutoAbility			  = Yes
  PresetRange			  = 120.0
  UnitSpecificSound       = muwitchking_myhour
  InPalantir			  = Yes
End

;-----------------------------------------------------------
;------------------SPECIALPOWER.INI-------------------------
;-----------------------------------------------------------

;------------------------------------------------------------------------------
SpecialPower SpecialAbilityWitchKingWordOfPower
	Enum			= SPECIAL_WORD_OF_POWER
	ReloadTime		= 360000
	PublicTimer		= No
End

;------------------------------------------------------------------------------
SpecialPower SpellBookWKAnduril
	Enum			= SPECIAL_HERO_MODE ;;;SPECIAL_SPELL_BOOK_ANDURIL
	ReloadTime      	= 0; 240000 ; in milliseconds
	PublicTimer     	= No
	;InitiateSound   	= RohirrimSpeechCheer
	;PalantirMovie		= PalantirAlert_RohanReinforcements	
    	;RequiredScience	= SCIENCE_Anduril
End

;------------------------------------------------------------------------------
SpecialPower SpecialAbilityWitchKingHeroMode
	Enum			= SPECIAL_HERO_MODE
	ReloadTime		= 10 
	PublicTimer		= No
End

;-----------------------------------------------------------
;------------------GAMEDATA.INI-----------------------------
;-----------------------------------------------------------
(Under the WitchKing data)

#define WITCHKING_WORD_OF_POWER_DAMAGE			1

;----------------------------------------------------------
;------------------Voice.ini-------------------------------
;----------------------------------------------------------

;------------------WitchKing---------------------

AudioEvent muwitchking_myhour
	Sounds = muwitchking_myhour
	Volume      = 150
	MinVolume   = 125
	Type        = world player voice
  SubmixSlider = voice
End

AudioEvent muwitchking_hour
	Sounds = muwitchking_hour
	Volume      = 150
	MinVolume   = 125
	Type        = world player voice
  SubmixSlider = voice
End

;-------------------------------------
;----------SoundEffects.ini-----------
;-------------------------------------

AudioEvent muwitchking_myhour
	Sounds		= muwitchking_myhour
  	Priority          = high
	Limit			= 1
	Volume		= 150
	MinRange		= 500
	MaxRange		= 1000
	Type			= world shrouded everyone 
	SubmixSlider	= SoundFX
End

AudioEvent muwitchking_hour
	Sounds		= muwitchking_hour
  	Priority 	= high
	Limit			= 1
	Volume		= 150
	MinRange		= 500
	MaxRange		= 1000
	Type			= world shrouded everyone 
	SubmixSlider	= SoundFX
End